/**********************************************************************/
/*   ____  ____                                                       */
/*  /   /\/   /                                                       */
/* /___/  \  /                                                        */
/* \   \   \/                                                       */
/*  \   \        Copyright (c) 2003-2009 Xilinx, Inc.                */
/*  /   /          All Right Reserved.                                 */
/* /---/   /\                                                         */
/* \   \  /  \                                                      */
/*  \___\/\___\                                                    */
/***********************************************************************/

/* This file is designed for use with ISim build 0xcb73ee62 */

#define XSI_HIDE_SYMBOL_SPEC true
#include "xsi.h"
#include <memory.h>
#ifdef __GNUC__
#include <stdlib.h>
#else
#include <malloc.h>
#define alloca _alloca
#endif
static const char *ng0 = "";
static const char *ng1 = " ";
static const char *ng2 = "a_in = %d,      s_out=%d";
static const char *ng3 = "C:/peter/enee408/project/FIRfilter/FIR_tb.v";
static int ng4[] = {0, 0};
static int ng5[] = {1, 0};
static unsigned int ng6[] = {16843009U, 0U};
static int ng7[] = {2, 0};
static int ng8[] = {3, 0};
static int ng9[] = {4, 0};
static int ng10[] = {5, 0};

void Monitor_48_1(char *);
void Monitor_48_1(char *);


static void Monitor_48_1_Func(char *t0)
{
    char t1[16];
    char *t2;
    char *t3;
    char *t4;
    char *t5;
    char *t6;
    char *t7;

LAB0:    t2 = xsi_vlog_time(t1, 1000.0000000000000, 1000.0000000000000);
    xsi_vlogfile_write(0, 0, 3, ng0, 2, t0, (char)118, t1, 64);
    xsi_vlogfile_write(0, 0, 3, ng1, 1, t0);
    t3 = (t0 + 1068);
    t4 = (t3 + 36U);
    t5 = *((char **)t4);
    t6 = (t0 + 840U);
    t7 = *((char **)t6);
    xsi_vlogfile_write(1, 0, 3, ng2, 3, t0, (char)118, t5, 8, (char)118, t7, 16);

LAB1:    return;
}

static void Initial_47_0(char *t0)
{
    char *t1;
    char *t2;
    char *t3;

LAB0:    t1 = (t0 + 1868U);
    t2 = *((char **)t1);
    if (t2 == 0)
        goto LAB2;

LAB3:    goto *t2;

LAB2:    xsi_set_current_line(47, ng3);

LAB4:    xsi_set_current_line(48, ng3);
    Monitor_48_1(t0);
    xsi_set_current_line(50, ng3);
    t2 = ((char*)((ng4)));
    t3 = (t0 + 1068);
    xsi_vlogvar_assign_value(t3, t2, 0, 0, 8);
    xsi_set_current_line(51, ng3);
    t2 = ((char*)((ng5)));
    t3 = (t0 + 1160);
    xsi_vlogvar_assign_value(t3, t2, 0, 0, 1);
    xsi_set_current_line(52, ng3);
    t2 = ((char*)((ng4)));
    t3 = (t0 + 1252);
    xsi_vlogvar_assign_value(t3, t2, 0, 0, 1);
    xsi_set_current_line(53, ng3);
    t2 = ((char*)((ng4)));
    t3 = (t0 + 1344);
    xsi_vlogvar_assign_value(t3, t2, 0, 0, 32);
    xsi_set_current_line(56, ng3);
    t2 = (t0 + 1768);
    xsi_process_wait(t2, 100000LL);
    *((char **)t1) = &&LAB5;

LAB1:    return;
LAB5:    xsi_set_current_line(61, ng3);
    t2 = ((char*)((ng5)));
    t3 = (t0 + 1252);
    xsi_vlogvar_assign_value(t3, t2, 0, 0, 1);
    xsi_set_current_line(62, ng3);
    t2 = ((char*)((ng6)));
    t3 = (t0 + 1344);
    xsi_vlogvar_assign_value(t3, t2, 0, 0, 32);
    xsi_set_current_line(63, ng3);
    t2 = (t0 + 1768);
    xsi_process_wait(t2, 5000LL);
    *((char **)t1) = &&LAB6;
    goto LAB1;

LAB6:    xsi_set_current_line(65, ng3);
    t2 = ((char*)((ng4)));
    t3 = (t0 + 1252);
    xsi_vlogvar_assign_value(t3, t2, 0, 0, 1);
    xsi_set_current_line(66, ng3);
    t2 = ((char*)((ng5)));
    t3 = (t0 + 1068);
    xsi_vlogvar_assign_value(t3, t2, 0, 0, 8);
    xsi_set_current_line(67, ng3);
    t2 = (t0 + 1768);
    xsi_process_wait(t2, 5000LL);
    *((char **)t1) = &&LAB7;
    goto LAB1;

LAB7:    xsi_set_current_line(69, ng3);
    t2 = ((char*)((ng7)));
    t3 = (t0 + 1068);
    xsi_vlogvar_assign_value(t3, t2, 0, 0, 8);
    xsi_set_current_line(70, ng3);
    t2 = (t0 + 1768);
    xsi_process_wait(t2, 5000LL);
    *((char **)t1) = &&LAB8;
    goto LAB1;

LAB8:    xsi_set_current_line(72, ng3);
    t2 = ((char*)((ng8)));
    t3 = (t0 + 1068);
    xsi_vlogvar_assign_value(t3, t2, 0, 0, 8);
    xsi_set_current_line(73, ng3);
    t2 = (t0 + 1768);
    xsi_process_wait(t2, 5000LL);
    *((char **)t1) = &&LAB9;
    goto LAB1;

LAB9:    xsi_set_current_line(75, ng3);
    t2 = ((char*)((ng9)));
    t3 = (t0 + 1068);
    xsi_vlogvar_assign_value(t3, t2, 0, 0, 8);
    xsi_set_current_line(76, ng3);
    t2 = (t0 + 1768);
    xsi_process_wait(t2, 5000LL);
    *((char **)t1) = &&LAB10;
    goto LAB1;

LAB10:    xsi_set_current_line(78, ng3);
    t2 = ((char*)((ng10)));
    t3 = (t0 + 1068);
    xsi_vlogvar_assign_value(t3, t2, 0, 0, 8);
    xsi_set_current_line(79, ng3);
    t2 = (t0 + 1768);
    xsi_process_wait(t2, 5000LL);
    *((char **)t1) = &&LAB11;
    goto LAB1;

LAB11:    goto LAB1;

}

static void Always_83_2(char *t0)
{
    char t3[8];
    char *t1;
    char *t2;
    char *t4;
    char *t5;
    char *t6;
    char *t7;
    unsigned int t8;
    unsigned int t9;
    unsigned int t10;
    unsigned int t11;
    unsigned int t12;
    char *t13;
    char *t14;
    char *t15;
    unsigned int t16;
    unsigned int t17;
    unsigned int t18;
    unsigned int t19;
    unsigned int t20;
    unsigned int t21;
    unsigned int t22;
    unsigned int t23;
    char *t24;

LAB0:    t1 = (t0 + 2012U);
    t2 = *((char **)t1);
    if (t2 == 0)
        goto LAB2;

LAB3:    goto *t2;

LAB2:    xsi_set_current_line(83, ng3);

LAB4:    xsi_set_current_line(84, ng3);
    t2 = (t0 + 1912);
    xsi_process_wait(t2, 2500LL);
    *((char **)t1) = &&LAB5;

LAB1:    return;
LAB5:    xsi_set_current_line(84, ng3);
    t4 = (t0 + 1160);
    t5 = (t4 + 36U);
    t6 = *((char **)t5);
    memset(t3, 0, 8);
    t7 = (t6 + 4);
    t8 = *((unsigned int *)t7);
    t9 = (~(t8));
    t10 = *((unsigned int *)t6);
    t11 = (t10 & t9);
    t12 = (t11 & 1U);
    if (t12 != 0)
        goto LAB9;

LAB7:    if (*((unsigned int *)t7) == 0)
        goto LAB6;

LAB8:    t13 = (t3 + 4);
    *((unsigned int *)t3) = 1;
    *((unsigned int *)t13) = 1;

LAB9:    t14 = (t3 + 4);
    t15 = (t6 + 4);
    t16 = *((unsigned int *)t6);
    t17 = (~(t16));
    *((unsigned int *)t3) = t17;
    *((unsigned int *)t14) = 0;
    if (*((unsigned int *)t15) != 0)
        goto LAB11;

LAB10:    t22 = *((unsigned int *)t3);
    *((unsigned int *)t3) = (t22 & 1U);
    t23 = *((unsigned int *)t14);
    *((unsigned int *)t14) = (t23 & 1U);
    t24 = (t0 + 1160);
    xsi_vlogvar_wait_assign_value(t24, t3, 0, 0, 1, 0LL);
    goto LAB2;

LAB6:    *((unsigned int *)t3) = 1;
    goto LAB9;

LAB11:    t18 = *((unsigned int *)t3);
    t19 = *((unsigned int *)t15);
    *((unsigned int *)t3) = (t18 | t19);
    t20 = *((unsigned int *)t14);
    t21 = *((unsigned int *)t15);
    *((unsigned int *)t14) = (t20 | t21);
    goto LAB10;

}

void Monitor_48_1(char *t0)
{
    char *t1;
    char *t2;

LAB0:    t1 = (t0 + 2056);
    t2 = (t0 + 2352);
    xsi_vlogfile_monitor((void *)Monitor_48_1_Func, t1, t2);

LAB1:    return;
}


extern void work_m_00000000001186027966_3031442038_init()
{
	static char *pe[] = {(void *)Initial_47_0,(void *)Always_83_2,(void *)Monitor_48_1};
	xsi_register_didat("work_m_00000000001186027966_3031442038", "isim/FIR_tb_isim_beh.exe.sim/work/m_00000000001186027966_3031442038.didat");
	xsi_register_executes(pe);
}
